package app.modules.infrastructure.profile.persistence.mapper;

import app.modules.infrastructure.profile.persistence.entity.ProfileValueEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mh.z
 */
public interface ProfileValueMapper extends BaseMapper<ProfileValueEO> {

    /**
     * 获取指定的配置值
     *
     * @param tenantId
     * @param userId
     * @param profileName
     * @param enabledOnly
     * @param requiredOnly
     * @param page
     * @return
     */
    List<ProfileValueEO> pageProfileValuesByProfileName(@Param("profileName") String profileName,
                                                        @Param("tenantId") Long tenantId,
                                                        @Param("userId") Long userId,
                                                        @Param("requiredOnly") boolean requiredOnly,
                                                        @Param("enabledOnly") boolean enabledOnly,
                                                        Page page);
}
